{#
  Copyright 2015 Google Inc. All Rights Reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
#}

<div class="action-type__dropdown" id="user-options-selector">
  <button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="user-create">
    <i class="material-icons">more_vert</i>
  </button>
  <ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="user-create" id="user-create-options">
    <li class="mdl-menu__item" id="create-user-option">Create User</li>
  </ul>
</div>

<div class="dialog" id="create-user">
  <div class="dialog__box">

    <section class="dialog__box-content">

      <form action="/users/create" method="post">
        <h1 class="dialog__title">Create a User</h1>

        <p class="dialog__description">This will allow access to this instance of Big Rig. If you want to grant Administrator privileges, do so through the AppEngine console.</p>

        <section class="dialog__section">
          <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
            <input class="mdl-textfield__input" type="email" name="user-email" value="" pattern=".+?@.+?\..+?" />
            <label class="mdl-textfield__label" for="user-email">User email</label>
            <span class="mdl-textfield__error">User email must not be empty.</span>
          </div>

        </section>

        <div class="dialog__button-container">
          <button type="button" class="cancel-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Cancel
          </button>

          <button type="button" class="confirm-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Create User
          </button>
        </div>

      </form>
    </section>

    <section class="dialog__spinner-container">
      <div class="dialog__spinner mdl-spinner mdl-js-spinner is-active"></div>
    </section>
  </div>
</div>

<div class="dialog" id="delete-user">
  <div class="dialog__box">

    <section class="dialog__box-content">

      <form action="/users/delete" method="post">
        <h1 class="dialog__title">Delete this user?</h1>

        <p class="dialog__description">This will remove the user and all their Projects will be reassigned to you. Are you sure?</p>

        <div class="dialog__button-container">
          <button type="button" class="cancel-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Cancel
          </button>

          <button type="button" class="confirm-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Delete User
          </button>
        </div>

        <input type="hidden" id="user-email" name="user-email" value="" />

      </form>
    </section>

    <section class="dialog__spinner-container">
      <div class="dialog__spinner mdl-spinner mdl-js-spinner is-active"></div>
    </section>
  </div>
</div>
